<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" name="" id="fir">
    <select name="" id="xuan">
        <option value="+">+</option>
        <option value="-">-</option>
        <option value="*">*</option>
        <option value="/">/</option>
    </select>
    <input type="text" id="se">
    <button id="btn">=</button>
    <input type="text" name="" id="jieguo">


    <script>
        window.onload = function () {
            let btn = document.getElementById("btn");
            btn.onclick = function () {
                var first = document.getElementById("fir").value;
                let se = document.getElementById("se").value;
                let xuan = document.getElementById("xuan").value;
                let jie = document.getElementById("jieguo").value;
                let jieguo = 0;
                if (xuan == "+") {
                    jieguo = first * 1 + se * 1;
                    // console.log(jie)
                }
                else if (xuan == "-") {
                    jieguo = first - se;
                }
                else if (xuan == "*") {
                    jieguo = first * se;
                }
                else if (xuan == "/") {
                    jieguo = first / se;
                }
                // console.log(jieguo)
                document.getElementById("jieguo").value = jieguo
                // jie.value = jieguo;
            }
        }

    </script>
</body>

</html>